home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / ASSEMBLE / H145.ZIP / ASXXXX_4.ZIP / T6805L.ASM < prev    next >
Assembly Source File  |  1990-07-18  |  2KB  |  82 lines

  1.     .sbttl    Assembler Link Tests
  2.  
  3.     .module    t6805l
  4.  
  5.     ; This file and TCONST.ASM should be assembled and linked.
  6.     ;
  7.     ; AS6805 -XGOL T6805L
  8.     ; AS6805 -XGOL TCONST
  9.     ;
  10.     ; ASLINK -C
  11.     ; -XMS
  12.     ; T6805L
  13.     ; TCONST
  14.     ; -E
  15.     ;
  16.     ; The following tests verify the correct processing of
  17.     ; external references for the direct page, index mode offsets,
  18.     ; and branches.
  19.     ;
  20.     ; *L signifies an error will be reported at link time.
  21.  
  22.     ; branch test must be first
  23.  
  24.     .area    TEST    (ABS,OVR)
  25.  
  26.     .blkb    0x7E        ;bra1:
  27.     bra    bra1        ;   20 00  [20 80]
  28.     .blkb    0x7F        ;bra2:
  29.     bra    bra2        ;*L 20 00  [20 7F]
  30.     bra    bra3        ;   20 00  [20 7F]
  31.     .blkb    0x7F
  32.     .blkb    0x00        ;bra3:
  33.     bra    bra4        ;*L 20 00  [20 [80]
  34.     .blkb    0x80
  35.     .blkb    0x00        ;bra4:
  36.  
  37.     .blkb    0x7E        ;bra5:
  38.     bra    bra5        ;   20 00  [20 80]
  39.     .blkb    0x7F        ;bra6:
  40.     bra    bra6        ;*L 20 00  [20 7F]
  41.     bra    bra7        ;   20 00  [20 7F]
  42.     .blkb    0x7F
  43.     .blkb    0x00        ;bra7:
  44.     bra    bra8        ;*L 20 00  [20 [80]
  45.     .blkb    0x80
  46.     .blkb    0x00        ;bra8:
  47.  
  48.     ; direct page test
  49.  
  50.     .area    DIRECT    (ABS,OVR)
  51.     .setdp    0,DIRECT
  52.  
  53.     lda    *minus1        ;*L B6 00  [B6 FF]
  54.     lda    *zero        ;   B6 00  [B6 00]
  55.     lda    *two55        ;   B6 00  [B6 FF]
  56.     lda    *two56        ;*L B6 00  [B6 00]
  57.  
  58.     lda    *lminus1    ;*L B6 00  [B6 FF]
  59.     lda    *lzero        ;   B6 00  [B6 00]
  60.     lda    *ltwo55        ;   B6 00  [B6 FF]
  61.     lda    *ltwo56        ;*L B6 00  [B6 00]
  62.  
  63.     ; indexed test
  64.  
  65.     lda    minus1,x    ;   D6 00 00  [D6 FF FF]
  66.     lda    zero,x        ;   D6 00 00  [D6 00 00]
  67.     lda    two55,x        ;   D6 00 00  [D6 00 FF]
  68.     lda    two56,x        ;   D6 00 00  [D6 01 00]
  69.  
  70.     ; direct page boundary / length checking
  71.  
  72.     .area    A
  73.  
  74.     .blkb    1
  75.  
  76.     .area    PAGE0    (PAG)    ;*L Linker -- page boundary error
  77.  
  78.     .setdp    0,PAGE0        ;*L Linker -- page definition boundary error
  79.  
  80.     .blkb    0x101        ;*L Linker -- page length error
  81.  
  82.